home *** CD-ROM | disk | FTP | other *** search
- 10 '** nohard.bas
- 11 '** author: Daniel M. Frank, Prairie Computing
- 12 '** written: Madison, WI. July 1984
- 13 '
- 14 '** this program disables access to the hard disk bios by
- 15 '** replacing the interrupt vector at interrupt 13H with the
- 16 '** original diskette routine vector (which is saved by the
- 17 '** fixed disk bios at interrupt 40H). It can be used when
- 18 '** testing new programs, etc., to protect against accidental
- 19 '** or malicious damage to one's precious hard disk files.
- 20 '** NOTE: This program should not be run on machines without
- 21 '** hard disks, since nothing is going to be at interrupt 40H,
- 22 '** and int 13H will then contain goose eggs. It has only been
- 23 '** shown to work with the IBM and Everex fixed disk bios.
- 24 '** Finally, no one can protect against real clever sorts who
- 25 '** do things like issue format drive commands directly to the
- 26 '** controller. Caveat runner, as it were.
- 27 '
- 28 '** Before running this, it is advisable to issue the
- 29 '** command "SET COMSPEC=A:\COMMAND.COM" to make sure
- 30 '** the operating system can find a command processor
- 31 '** after the hard disk disappears.
- 32 '
- 33 '** Once you have run it, any accesses to any hard disk
- 34 '** will cause an "Error accessing drive x" message. You
- 35 '** can get your disk back by warm booting.
- 36 '
- 37 '** At the risk of stating the obvious, to run this, type:
- 38 '** "BASICA NOHARD" and press return. When you get a DOS
- 39 '** prompt back, your hard disks (and perhaps your ring
- 40 '** around the collar) will be gone! By the way, if you
- 41 '** type DIR and can still get a directory listing, it's
- 42 '** because DOS 2.0 and above buffer some disk sectors,
- 43 '** and the OS hasn't had to go the bios yet. After a few
- 44 '** (floppy) accesses, this will go away, and since the buffer
- 45 '** is read only anyway, it won't cause any problems.
- 46 '
- 100 def seg = 0
- 110 defint a-z
- 120 int13 = &H13 * 4
- 130 int40 = &H40 * 4
- 140 byte0 = peek (int40)
- 150 byte1 = peek (int40+1)
- 160 byte2 = peek (int40+2)
- 170 byte3 = peek (int40+3)
- 180 poke int13, byte0
- 190 poke int13+1, byte1
- 200 poke int13+2, byte2
- 210 poke int13+3, byte3
- 220 system
- e int13+3, byte3
- 220 system
-